package com.webblog.service.classify;

import com.webblog.dao.classify.ClassifyMapper;
import com.webblog.pojo.Classify;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class ClassifyServiceImpl implements ClassifyService{

    @Autowired
    private ClassifyMapper classifyMapper;

    public Integer addClassify(Classify classify) {
        return classifyMapper.insertClassify(classify);
    }

    public Integer removeClassify(int id) {
        return classifyMapper.deleteClassify(id);
    }

    public Integer updateClassify(Classify classify) {
        return classifyMapper.updateClassify(classify);
    }

    public List<Classify> findAllClassify() {
        return classifyMapper.selectAllClassify();
    }

    public Classify findClassifyById(int id) {
        return classifyMapper.selectClassifyById(id);
    }


}
